// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "USessionResultObject.h"
#include "Components/ListViewBase.h"
#include "JoinSessionButton.generated.h"

/**
 * 
 */
UCLASS()
class MULTIPLAYERSESSIONS_API UJoinSessionButton : public UUserWidget, public IUserObjectListEntry
{
	GENERATED_BODY()

public:
	UFUNCTION(BlueprintCallable)
	void JoinSession();

protected:
	virtual void NativeOnListItemObjectSet(UObject* ListItemObject) override;
	
private:
	UPROPERTY(meta=(BindWidget))
	class UTextBlock* TextSessionName;
	UPROPERTY(meta=(BindWidget))
	UTextBlock* TextSessionOwner;
	UPROPERTY(meta=(BindWidget))
	UTextBlock* TextPlayerNumber;

	UPROPERTY()
	UUSessionResultObject* SessionResultObject;
};
